<?php
/**
 * 用户个人人类图验证器
 */

namespace app\common\validate;

class ChartPersonalValidate extends CommonBaseValidate
{
    protected $rule = [
            'user_id|用户ID' => 'require',
            'name|姓名' => 'require',
            'birth|生日' => 'require|date',
            'timezone|时区数字' => 'require|integer|between:-12,13',
            'timezone_text|时区文字' => 'require',
        ];

    protected $message = [
            'user_id.required' => '用户ID不能为空',
            'name.required' => '姓名不能为空',
            'birth.required' => '生日不能为空',
            'timezone.required' => '不能为空',
            'timezone_text.required' => '不能为空',

        ];

    protected $scene = [
        'admin_del'     => ['id', ],
        'admin_disable' => ['id', ],
        'admin_enable'  => ['id', ],
        'api_info'      => ['name', 'birth', 'timezone', 'timezone_text', ],
        'api_edit'      => ['id', 'user_id', 'name', 'birth', 'timezone', 'timezone_text', ],
        'api_del'       => ['id', ],
        'api_disable'   => ['id', ],
        'api_enable'    => ['id', ],
    ];
}
